{%- macro generate_dscp_to_tc_map_per_sku() -%}
    "DSCP_TO_TC_MAP": {
        "AZURE": {
            "0" : "0",
            "1" : "0",
            "2" : "0",
            "3" : "3",
            "4" : "4",
            "5" : "0",
            "6" : "0",
            "7" : "0",
            "8" : "0",
            "9" : "0",
            "10": "0",
            "11": "0",
            "12": "0",
            "13": "0",
            "14": "0",
            "15": "0",
            "16": "0",
            "17": "0",
            "18": "0",
            "19": "0",
            "20": "0",
            "21": "0",
            "22": "0",
            "23": "0",
            "24": "0",
            "25": "0",
            "26": "0",
            "27": "0",
            "28": "0",
            "29": "0",
            "30": "0",
            "31": "0",
            "32": "0",
            "33": "0",
            "34": "0",
            "35": "0",
            "36": "0",
            "37": "0",
            "38": "0",
            "39": "0",
            "40": "0",
            "41": "0",
            "42": "0",
            "43": "0",
            "44": "6",
            "45": "0",
            "46": "5",
            "47": "1",
            "48": "0",
            "49": "0",
            "50": "0",
            "51": "0",
            "52": "0",
            "53": "0",
            "54": "0",
            "55": "0",
            "56": "0",
            "57": "0",
            "58": "0",
            "59": "0",
            "60": "0",
            "61": "0",
            "62": "0",
            "63": "0"
        }
    },
{%- endmacro -%}

{%- macro generate_scheduler_per_sku() -%}
    "SCHEDULER": {
        "SCHEDULER_Q1": {
            "type"  : "DWRR",
            "weight": "10"
        },
        "SCHEDULER_Q3": {
            "type"  : "DWRR",
            "weight": "20"
        },
        "SCHEDULER_Q4": {
            "type"  : "DWRR",
            "weight": "10"
        },
        "SCHEDULER_Q6": {
            "type"  : "DWRR",
            "weight": "70"
        },
        "SCHEDULER_DEFAULT": {
            "type"  : "DWRR",
            "weight": "10"
        }
    },
{%- endmacro -%}

{%- macro generate_single_queue_per_sku(port) -%}
        "{{ port }}|0": {
            "scheduler": "SCHEDULER_DEFAULT"
        },
        "{{ port }}|1": {
            "scheduler": "SCHEDULER_Q1"
        },
        "{{ port }}|2": {
            "scheduler": "SCHEDULER_DEFAULT"
        },
        "{{ port }}|3": {
            "scheduler": "SCHEDULER_Q3",
            "wred_profile": "WRED_LOSSLESS_Q3"
        },
        "{{ port }}|4": {
            "scheduler": "SCHEDULER_Q4",
            "wred_profile": "WRED_LOSSLESS_Q4"
        },
        "{{ port }}|5": {
            "scheduler": "SCHEDULER_DEFAULT"
        },
        "{{ port }}|6": {
            "scheduler": "SCHEDULER_Q6"
        },
        "{{ port }}|7": {
            "scheduler": "SCHEDULER_DEFAULT"
        }
{%- endmacro -%}

{%- macro generate_wred_profiles() -%}
    "WRED_PROFILE": {
        "WRED_LOSSLESS_Q3": {
            "ecn": "ecn_all",
            "green_drop_probability": "5",
            "green_max_threshold": "262144",
            "green_min_threshold": "131072",
            "red_drop_probability": "5",
            "red_max_threshold": "262144",
            "red_min_threshold": "131072",
            "wred_green_enable": "true",
            "wred_red_enable": "true",
            "wred_yellow_enable": "true",
            "yellow_drop_probability": "5",
            "yellow_max_threshold": "262144",
            "yellow_min_threshold": "131072"
        },
        "WRED_LOSSLESS_Q4": {
            "ecn": "ecn_all",
            "green_drop_probability": "5",
            "green_max_threshold": "262144",
            "green_min_threshold": "131072",
            "red_drop_probability": "5",
            "red_max_threshold": "262144",
            "red_min_threshold": "131072",
            "wred_green_enable": "true",
            "wred_red_enable": "true",
            "wred_yellow_enable": "true",
            "yellow_drop_probability": "5",
            "yellow_max_threshold": "262144",
            "yellow_min_threshold": "131072"
        }
    },
{%- endmacro -%}

{%- include 'qos_config.j2' %}
